package com.neutech.service.impl;
import com.neutech.mapper.SchedulMapper;
import com.neutech.service.SchedulService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public  class SchedulServiceImpl implements SchedulService {
    @Autowired
    private SchedulMapper schedulMapper;
    @Override
    public List<Map<String, Object>> querySchedul() {
        List<Map<String, Object>> list = schedulMapper.querySchedulList(0);
        return list;
    }
    @Override
    public void insertSchedul(Map map){
        Integer a = schedulMapper.addSchedul(map);

    }
    public void updataSchedul(Map map){
        schedulMapper.updataSchedulById(map);
    }
    public void deleteSchedul(Map map){
       // doctorMapper.delDoctorById(map);
//        System.out.println(map.get("docid"));
//        System.out.println("kanzheli");
        Integer schid= Integer.valueOf(map.get("schid").toString());
        schedulMapper.delSchedulById(schid);
    }
}
